package com.wt.chat.mapper;

import com.wt.chat.entity.Message;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MessageMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Message record);

    int insertSelective(Message record);

    Message selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Message record);

    int updateByPrimaryKey(Message record);

	/**
	 * 根据会话id查询所有
	 * @param dialogId
	 * @return
	 */
	List<Message> findByDialog(@Param("dialogId") Integer dialogId);
}